<div class="row">
  <div class="span2 bs-docs-sidebar ">
 	<*include file="<*$controller*>/location.tpl"*>
  </div>
  <link rel="stylesheet" href="/css/lightbox.css" media="screen"/>

  <div class="span10 clearfix " > 
  <form class="form-search" action="/<*$controller*>/<*$action*>/groupid/<*$groupid*>" method="get">
   <strong><*$group.groupname*></strong>&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-small" onClick="window.location='/picture/index'" > 切换集团 </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="schoolid" id="schoolid" class="select"> 
                    <option value="0">---选择校区---</option> 
                    <*foreach from =$school_picture item=a key=k*>
                    <option value="<*$k*>" <*if $schoolid==$k*> selected<*/if*>>      <*$school.$k.schoolname*>(<*$a.number*>)      </option> 
                    <*/foreach*>
                </select>&nbsp;&nbsp;
  <button type="submit" class="btn btn-primary btn-small" > 切换校区 </button>
</form>
      <hr />
    <*if $schoolid*>  
    	<*if $uploaddatelist*>

         <ul class="unstyled inline">
         	<*foreach from=$uploaddatelist item=item key=key*>
         		<li style="width:150px; margin-bottom:10px;" >
                	<a href="/<*$controller*>/<*$action*>/groupid/<*$groupid*>/schoolid/<*$schoolid*>/uploaddate/<*$key*>" class="btn btn-small <*if $key==$uploaddate*>btn-inverse<*/if*>"> <i class="icon-th"></i> <*$key*> (<*$item*>)</a>
                </li>
            <*/foreach*>
         </ul>

        <*/if*>
    <div class="container-fluid">
		<*if $picturelist *>
<!--<form action="/<*$controller*>/choosechecked" method="post"   id="f1">  
-->
<form action="/<*$controller*>/operatechecked" method="post" id="f1">     	
<div class="form-actions">
                   <button type="submit" class="btn btn-primary btn-block">完成选择，进行处理</button>   

</div>   
	

                <ul class="unstyled row-fluid">
                <*for $foo=0 to $list-1*> 
                <li class="span4">
                <*foreach from=$picturelist.$foo item=item key =key*>
                <div class="white-panel" style="padding:5px;background:#6f6" id="panel<*$foo*>_<*$key*>" >
                
<!--                            <a  href="<*$item.avatar*>.small.jpg" data-lightbox="example-set" class="example-image-link" title="<a href='<*$item.avatar*>' target='_blank'>点此链接下载大图</a>"><img class="example-image" title="<*$item.classname*> <*$item.uploadtimeDisp*> <*$item.intro*>" name="picture"  src="<*$item.avatar*>.small.jpg" /></a> 
-->                            <a  href="<*$item.avatar*>.small.jpg" data-lightbox="example-set" class="example-image-link" title="<a href='<*$item.avatar*>' target='_blank'>点此链接下载大图</a>"><img title="<*$item.classname*> <*$item.uploadtimeDisp*> <*$item.intro*>" name="picture"  src="<*$item.avatar*>.small.jpg" /></a> 

                        	 <div class="white-panel-content5">
                             <*if $item.intro*><*$item.intro*><hr><*/if*>
<!--                            <label class="checkbox" name="check_<*$item.articlefilesid*>[]" id="<*$item.articlefilesid*>" value="<*$item.articlefilesid*>"><input type="checkbox"> 审核通过</label>
                            <label class="checkbox" name="group_<*$item.articlefilesid*>[]" id="<*$item.articlefilesid*>" value="<*$item.articlefilesid*>"><input type="checkbox"> 选为作品集</label>
                            <label class="checkbox" name="delete_<*$item.articlefilesid*>[]" id="<*$item.articlefilesid*>" value="<*$item.articlefilesid*>"><input type="checkbox"> 删除</label>
-->                             <span style="float:right; text-align:right"><small><*if $item.memberlist eq 0*>全班学生<*else*><*count($item.memberlist)*>个孩纸<*/if*><br/><strong><*$item.classname*></strong><br /> <*$item.uploadtimeDisp*></small></span>
                            <label class="radio text-success" onClick="$('#panel<*$foo*>_<*$key*>').css({'background':'#6f6'});">
                              <input type="radio" name="check[<*$item.articlefilesid*>]" id="check1" value="1" checked >
                              <strong>审核通过</strong>
                            </label>
                            <label class="radio" onClick="$('#panel<*$foo*>_<*$key*>').css({'background':'#fff'});" >
                              <input type="radio" name="check[<*$item.articlefilesid*>]" id="check0" value="0" >
                              暂时忽略
                            </label>

                            <label class="radio text-warning" onClick="$('#panel<*$foo*>_<*$key*>').css({'background':'#f66'});" >
                              <input type="radio" name="check[<*$item.articlefilesid*>]" id="check3" value="3">
                              删除
                            </label>  
                            
                            <label for="works<*$item.articlefilesid*>" class="checkbox"><input type="checkbox" <*if $item.mark==1*>checked<*/if*> id="works<*$item.articlefilesid*>" name="works[]" value="<*$item.articlefilesid*>" > 加入作品集</label>
	                                                      
                            <!--<input type="checkbox" style="float:left;background:none" onclick="checkedov(<*$item.articlefilesid*>)" name="htmlid[]" id="<*$item.articlefilesid*>" value="<*$item.articlefilesid*>" />-->
                           
                           
                            </div>
                            </div>
                       <*/foreach*> </li><*/for*>
</ul>
                       
<div class="form-actions">
                   <button type="submit" class="btn btn-primary btn-block">完成选择，进行处理</button>   

</div>   
				<input type="hidden" name="uploaddate" id="pagenum" value="<*$uploaddate*>"/>
				<input type="hidden" name="pid" id="pid" value="<*$groupid*>"/>
				<input type="hidden" name="sid" id="sid" value="<*$schoolid*>"/>
</form>
<!--				<input type="hidden" name="ischecked" id="ischecked" value="0"/>
-->                    

        <*else*>
                <p>
            <div class="span6" >

        <div style="clear:both; margin-left:30px; padding-top:20px;">暂时没有图片！</div>    
            </div>
        </p>
        <*/if*>
    </div> 
    <*else*>
      <div class="span5"> 
        <*if $school_picture*>
        <table class="table table-bordered table-hover" style="cursor:pointer; margin-top:15px; margin-left:20px;" >
            <tr><th>有待审核照片的校区</th><th>&nbsp;</th></tr>
            <*foreach from =$school_picture item=a key=k*>
            <tr onclick="window.location='/picture/check/groupid/<*$groupid*>/schoolid/<*$k*>'"><td><*$school.$k.schoolname*></td><td><*$a.number*></td></tr>
            <*/foreach*>
        </table>
        <*else*>
        <p>
            <div class="span6" >
                <div class="alert "><strong>恭喜你！</strong>&nbsp;没有需要审核的照片！</div>
            </div>
        </p>
        <*/if*>
  </div>

    
    <*/if*>   
</div>
</div>
<script src="/js/lightbox-2.6.min.js"></script>
<script type="text/javascript">

function checkhtml(action){
	
	if(action=='check')	{
		document.getElementById('f1').action='/<*$controller*>/choosechecked';
	}else if(action=='del'){
		if(confirm("确定要删除吗？")){
		   document.getElementById('f1').action='/<*$controller*>/choosedelete';
		}
	}else if(action=='growup'){
		document.getElementById('f1').action='/<*$controller*>/growup';
	}
//	alert(document.getElementById('f1').action);return 0;

	
	var checkboxs=document.getElementsByName("htmlid[]");
	var clength=checkboxs.length;
	var isc=0;
	for (var i=0;i<clength;i++) {
		var e=checkboxs[i].value;
		var es=document.getElementById(e);
		if(es.checked==true){
			isc=1;
		}
	}
	if(isc==0){
		alert('ddd');
		return false;
	}
	document.getElementById('f1').submit();
	return true;
}

function checkedov(id){
	var ischecked=document.getElementById("ischecked");
	var ids=document.getElementById(id);
	if(ids.checked==true){
		ischecked.value=1;
	}
}

function xuanhtml() {
	var qxhtml=document.getElementById("qxhtml");
	var checkboxs=document.getElementsByName("htmlid[]");
	var ischecked=document.getElementById("ischecked");
	if(qxhtml.checked==true){
		for (var i=0;i<checkboxs.length;i++) {
			var e=checkboxs[i];
			e.checked=true;
		}
		ischecked.value=1;
	}else{
		for (var i=0;i<checkboxs.length;i++) {
			var e=checkboxs[i];
			e.checked=false;
		}
		ischecked.value=0;
	}
}



  function deleteit(aid,page,groupid,schoolid)
{
  if(confirm("确定要删除吗？")){
   window.location='/<*$controller*>/picdelete/aid/'+aid+'/page/'+page+'/groupid/'+groupid+'/schoolid/'+schoolid;
  }
} 


function chooseit(adid)
{
   window.location='/<*$controller*>/check/groupid/'+adid;
}

</script> 
